/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ars.sirproj.controller;

import com.ars.sirproj.dao.UsuarioDao;
import com.ars.sirproj.dto.Usuario;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 * @author Anibal
 */
@Controller
@RequestMapping("/Usuario")
public class UsuarioController {
    
    private UsuarioDao userDao;

@RequestMapping(value="/view")    
public ModelAndView list(HttpServletRequest request,HttpServletResponse response){
ModelMap  modelMap = new ModelMap();
modelMap.addAttribute("userlist",userDao.findUsuario());
modelMap.addAttribute("user",new Usuario());
return new ModelAndView("index",modelMap);


}
}
